package com.tianheng.modbus;

import com.tianheng.modbus.nettyservice.Server;
import com.tianheng.modbus.service.TCPServerNetty;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Arrays;

@SpringBootApplication
@EnableScheduling
@EnableAsync
public class ModbusApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(ModbusApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {

//        new TCPServerNetty(8888).start();
        new Server(520).start();







}
}
